/*
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-20 09:40:34
 * @LastEditTime: 2022-05-20 10:53:41
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description:
 */
import { createArticle, editArticle } from '@/api/article'
import { ElMessage } from 'element-plus'
import i18n from '@/i18n'
const t = i18n.global.t
export const submit = async(data, cb) => {
  await createArticle(data)
  cb()
  ElMessage.success(t('article.createSuccess'))
}
export const edit = async(data, cb) => {
  await editArticle(data)
  cb()
  ElMessage.success(t('article.editorSuccess'))
}
